We provide here the necessary files to fun the experiments from our work, with the exception of the accompanying downloaded datasets or network states 

An example command for running an experiment is:

python "./Subnetwork Training for MI.py" --network="AlexNet" --attacktype="FGSM" --dataset="CIFAR10" --num_fb_layers=4 --batchsize=512 --epochs=20 --eps=8 --attack_iterations=1

We've additionally provided comments throughout the code to help inform use. We give a summary of the files below:
Subnetwork_Training_for_MI.py: Main script for driving the experiment
data.py: Manages downloading datasets and producing dataloaders
Manager.py: Provides a Manager class which stores a model and handles training, evaluation, MI calculation, and model loading/saving.
Utils.py: Provides code for calculating activation values for MI calculation
Mi_estimator.py: Code for calculating MI
cifar10.py and cifar100.py: Provides models which are compatible with the respective datasets. 
alg2.py and manager_lincom.py: Provide the functionality for running the algorithm in the Supplementary Materials

Note: Imagenette is handled through Torchvisions' Imagenet models which were finetuned to use 10 output classes